<script src="#url('/static/js/common/commonImageUpload.js')"></script>
<script type="text/javascript" >
    AppComm.include.load("#url('/static/js/common/commonSelectSearch.js')", "js");
    AppComm.include.load("#url('/static/js/example/selectSearch.js')", "js");
    AppComm.include.load("#url('/static/js/common/commonImageUpload.js')", "js");
    AppComm.include.load("#url('/static/js/util/util.js')", "js");
    AppComm.include.load("#url('/static/js/manager/userInfo.js')","js");
</script>

<div class="animated fadeIn">
    <div style="text-align: left;">
        <span class="layui-breadcrumb">
                <a href="">系统管理</a>
                <a><cite>员工管理</cite></a>
        </span>
    </div>
    <hr>
    <div class="userManager_box"></div>
</div>

<script id="userInfoManagerList_template" type="text/html">
    <div style="text-align: left;">
        <form class="layui-form" lay-filter="searchForm" action="">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input name="username" type="text" placeholder="姓名" class="layui-input" style="width:200px;">
                </div>
            </div>
            <div class="layui-inline">
                &nbsp;&nbsp;
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="searchBtn">查询</button>
                <button class="layui-btn layui-btn-normal" id="addBtn">添加</button>
            </div>
        </form>
    </div>

    <div style="width:100%">
        <table id="tb_list" lay-filter="tb_list" style="width:100%"></table>
    </div>
</script>

<script type="text/html" id="toolbar">
    <a class="layui-btn layui-btn-xs" lay-event="editBtn">编辑</a>
    <a class="layui-btn layui-btn-xs" lay-event="perBtn">角色授权</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteBtn">删除</a>
</script>

<script id="userInfoManagerForm_template" type="text/html">
    <div class="layui-tab-item layui-show" style="width:652px;margin: 0 auto;">
    <form class="layui-form" id="layerForm">
    <input type="hidden" id="id" name="id" value="{{userInfo&&userInfo.id}}" >
    <input type="hidden" id="userId" name="userId" value="{{userInfo&&userInfo.userId}}" >

        <div class="layui-input-inline" style="float: left">
            <div class="layui-col-xs6">
                <label class="layui-form-label">头像</label>
                <div class="layui-input-block">
                    <img style="width: 100px;height: 100px" src="${fileServerPath}/{{unitFile&&unitFile.sourceUrl}}" id="test_imgUpload2Preview">
                </div>
                <br>
                <div class="layui-input-block" style="width:205px;margin-bottom: 10px;">
                    <button type="button" class="layui-btn" id="test_imgUpload2">选择图片</button>
                </div>
            </div>
        </div>
    <div class="layui-form-item">
        <div class="layui-inline" style="margin-bottom: 10px">
                <label class="layui-form-label">账号</label>
                <div class="layui-input-inline">
                    <input type="text" id="username" name="username" lay-verify="required|userNameValidate" placeholder="请输入账号" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.username}}">
                </div>
        </div>

    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-inline">
                    <input type="text" id="fullname" name="fullname" placeholder="请输入姓名" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.fullname}}">
                </div>
        </div>
        <div class="layui-inline">
                <label class="layui-form-label">电话</label>
                <div class="layui-input-inline">
                    <input type="text" id="phone" name="phone" lay-verify="phone"  placeholder="请输入电话号码" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.phone}}">
                </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
                <label class="layui-form-label">邮箱</label>
                <div class="layui-input-inline">
                    <input type="text" id="email" name="email" lay-verify="email" placeholder="请输入邮箱" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.email}}">
                </div>
        </div>
        <div class="layui-inline">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-inline">
                    <input type="text" id="orderId" name="orderId" lay-verify="number" placeholder="请输入排序数字" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.orderId}}">
                </div>
        </div>
    </div>

        <div class="layui-form-item">
                <label class="layui-form-label">简介</label>
                <div class="layui-input-block">
                    <textarea style="width: 512px;" placeholder="请输入内容" id="comment" name="comment" class="layui-textarea">{{userInfo&&userInfo.comment}}</textarea>
                </div>
        </div>
    <div class="layui-form-item">
        <div class="layui-inline">
                <label class="layui-form-label">昵称</label>
                <div class="layui-input-inline">
                    <input type="text" id="nickName" name="nickName"  placeholder="请输入昵称" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.nickName}}">
                </div>
        </div>
        <div class="layui-inline">
                <label class="layui-form-label">真实姓名</label>
                <div class="layui-input-inline">
                    <input type="text" id="realName" name="realName"    placeholder="请输入真实姓名" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.realName}}">
                </div>
        </div>
    </div>
        <div class="layui-form-item">
                <label class="layui-form-label">用户类型</label>
                <div class="layui-input-inline" style="width: 512px;">
                    <div id="userTypeDiv" lay-filter="" class="layui-form">
                        <select lay-search id="userType"></select>
                    </div>
                    <!--<input type="text" id="userType" name="userType"    placeholder="请输入用户类型" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.userType}}">-->
                </div>
        </div>


        <div class="layui-form-item">

                <label class="layui-form-label">地址</label>
                <div class="layui-inline">
                    <div   style="width: 140px;"  id="provinceDiv" lay-filter="demoDivFilter" class="layui-form">
                        <select lay-search id="province" name="province" lay-filter="province">
                        </select>
                    </div>
                    <!--<input type="text" id="province" name="province"   placeholder="请输入省" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.province}}">-->
                </div>
                <div class="layui-inline">
                    <div   style="width: 140px;" id="cityDiv" lay-filter="demoDivFilter" class="layui-form">
                        <select lay-search id="city" name="city" lay-filter="city">
                        </select>
                    </div>
                    <!--<input type="text" id="city" name="city"   placeholder="请输入市" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.city}}">-->
                </div>


                <div class="layui-inline">
                    <div style="width: 140px;" id="areaDiv" lay-filter="demoDivFilter" class="layui-form">
                        <select lay-search id="area" name="area" lay-filter="area">
                        </select>
                    </div>
                    <!--<input type="text" id="area" name="area"  placeholder="请输入区" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.area}}">-->
                </div>
        </div>

        <div class="layui-form-item">
                <label class="layui-form-label">详细地址</label>
                <div class="layui-input-block" style="width: 512px;">
                    <input type="text" id="address" name="address"  placeholder="请输入详细地址" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.address}}">
                </div>
        </div>
        <div class="layui-form-item">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block">
                    <input name="sex" value="1" title="男" checked="" type="radio">
                    <input name="sex" value="2" title="女" type="radio">
                    <!--<input type="text" id="sex" name="sex"  placeholder="请输入性别" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.sex}}">-->
                </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">组织</label>
                <div class="layui-input-inline">
                    <input type="text" id="orgId" name="orgId"  placeholder="请输入组织" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.orgId}}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">身份证号码</label>
                <div class="layui-input-inline">
                    <input type="text" id="idCard" name="idCard" lay-verify="identity" placeholder="请输入身份证号码" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.idCard}}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <!--<div class="layui-inline">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-inline">
                    <input type="text" id="remarks" name="remarks"   placeholder="请输入备注" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.remarks}}">
                </div>
            </div>-->
            <!--<div class="layui-inline">
                <label class="layui-form-label">附件</label>
                <div class="layui-input-inline">
                    <input type="text" id="attachId" name="attachId" placeholder="请输入电子邮箱" autocomplete="off" class="layui-input" value="{{userInfo&&userInfo.attachId}}">
                </div>
            </div>-->
        </div>
    <br>
    <div class="layui-form-item">
        <div class="layui-inline" style="margin-left: 245px;width:182px;">
            <button class="layui-btn" id="saveBtn" lay-submit="" lay-filter="saveBtn1">提交</button>
            <button class="layui-btn" id="cancelBtn">取消</button>
        </div>
    </div>
    </form>
    </div>
</script>

<!--角色授权页-->
<script id="userManagerList_role" type="text/html">
    <div id="roLog" style="margin: 10px;">
    </div>
    <div style="text-align: left;margin: 10px;">
        <form class="layui-form" lay-filter="searchRoleForm" action="">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input name="roleName" type="text" placeholder="角色名称" class="layui-input" style="width:200px;">
                </div>
            </div>
            <div class="layui-inline">
                &nbsp;&nbsp;
                <button class="layui-btn" lay-submit lay-filter="searchRole">查询</button>
                <button class="layui-btn" id="getCheckData" data-type="getCheckData">提交</button>
            </div>
        </form>
    </div>

    <div style="margin: 10px;">
        <table id="ro_list" lay-filter="ro_list" ></table>
    </div>
</script>